package com.zdy.reflection;

import java.lang.annotation.ElementType;

/**
 * Created by 逸足天涯
 * on 3/5/2020.
 */

//所有类型的Class对象
//一个加载的类在JVM中只会有一个Class实例
public class Test04 {

    public static final int X = 9;

    public static void main(String[] args) {
        Class c1 = Object.class;
        Class c2 = Comparable.class;

        Class c3 = String[].class;
        Class c31 = String[][].class;
        Class c32 = String[][][].class;
        Class c33 = String[][][][].class;
        Class c4 = int[][].class;
        Class c5 = Override.class;
        Class c6 = ElementType.class;
        Class c7 = Integer.class;
        Class c8 = void.class;
        Class c9 = Class.class;

        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c31);
        System.out.println(c32);
        System.out.println(c33);
        System.out.println(c4);
        System.out.println(c5);
        System.out.println(c6);
        System.out.println(c7);
        System.out.println(c8);
        System.out.println(c9);;

        //只要元素和维度一样就是同一个Class
        int [] a = new int[10];
        int [] b = new int[100];
        System.out.println(a.getClass().hashCode());
        System.out.println(b.getClass().hashCode());
    }




}
